package com.wangtao.rpc.api;

import com.wangtao.rpc.netty.NettyClient;

public class ClientStrap {
    public static void main(String[] args) {
        //自定义协议，随便写的
        String serviceName = "HelloService#Hello#";
        //启动客户端获取代理对象
        HelloServie servie = (HelloServie) NettyClient.getBean(HelloServie.class, serviceName);
        //调用服务提供者方法并得到结果
        String message = servie.sayHello("小明");
        System.out.println("客户端接收到结果:"+message);
    }
}
